use "reproduction data.dta", clear


gl weather aqi israin wind temp
gl provdate provid##datenum
xtset cityid datenum
/////Figure 0 daily average inner-city mobility index and daily average GSMP about COVID-19

twoway (scatter avmove2020 avyccovid, ytitle("Daily average inner-city mobility index") xtitle("Daily average number of local government social media posts about COVID-19")) (lfit avmove2020 avyccovid) 

////Table 2.  variables, definitions, and descriptive statistics
sum yccovid_ situation prevention_ lconfirmed ldaily move2020  lnbaidumap lngaodemap move2019 aqi israin wind temp regulation if provid!=42
sum gdpp2019 internetp2019 education2020 lnguanzhu if  provid!=42 & datenum==21955

/////Table 3. Effect of government social media posts on citizen compliance behavior
reghdfe move2020 l.yccovid_ if provid!=42, absorb(cityid datenum) vce (cluster cityid)
est sto table1_1
reghdfe move2020 l.yccovid_   $weather if provid!=42, absorb(cityid datenum) vce (cluster cityid)
est sto table1_2
reghdfe move2020 l.yccovid_  $weather lconfirmed ldaily if provid!=42, absorb(cityid datenum) vce (cluster cityid)
est sto table1_3
reghdfe move2020 l.yccovid_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid datenum) vce (cluster cityid)
est sto table1_4

esttab table1_1 table1_2 table1_3 table1_4 using Table3.rtf, nogap con r2 se star(* 0.05 ** 0.01 *** 0.001) b(%9.4f) replace


/////Table 4. Robustness checks with alternative measures and a placebo test
reghdfe lnbaidumap l.yccovid_  $weather lconfirmed  ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_1
reghdfe lngaodemap l.yccovid_  $weather lconfirmed  ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_2
reghdfe move2019 l.yccovid_ if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_3
esttab table1_1 table1_2 table1_3 using Table4.rtf, nogap r2 se star(+ 0.10 * 0.05 ** 0.01 *** 0.001)  b(%9.4f) replace

/////Table 5-Correlation between the number of following of a city’s social media account and other city features.

reg lnguanzhu gdpp2019 i.provid if datenum==21945 & provid!=42, cluster(provid)
est sto table1_1

reg lnguanzhu internetp2019 i.provid if datenum==21945 & provid!=42, cluster(provid)
est sto table1_2

reg lnguanzhu education2020 i.provid if datenum==21945 & provid!=42, cluster(provid)
est sto table1_3

reg lnguanzhu education2020 internetp2019 gdpp2019 i.provid if datenum==21945 & provid!=42, cluster(provid)
est sto table1_4

esttab table1_1 table1_2 table1_3 table1_4  using Table5.rtf, nogap con r2 se star(* 0.05 ** 0.01 *** 0.001) b(%9.4f) replace

/////Table 6-Effect of government social media posts on citizen compliance behavior: IV strategy
ivreghdfe move2020 (l.yccovid_=l.lnguanzhuAfter) if provid!=42, absorb(cityid datenum) cluster(cityid) first
est sto table1_1
ivreghdfe move2020 (l.yccovid_=l.lnguanzhuAfter)  $weather if provid!=42, absorb(cityid datenum) cluster(cityid) first
est sto table1_2
ivreghdfe move2020 (l.yccovid_=c.l.lnguanzhuAfter) $weather lconfirmed ldaily if provid!=42, absorb(cityid datenum) cluster(cityid) first
est sto table1_3
ivreghdfe move2020 (l.yccovid_=c.l.lnguanzhuAfter) $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid) first
est sto table1_4
esttab table1_1 table1_2 table1_3 table1_4   using Table6.rtf, nogap con r2 se star( * 0.05 ** 0.01 *** 0.001) b(%9.4f) replace


/////Table 7. Mediation analysis of effects of different topics in government social media posts on citizen compliance behavior
reghdfe  l.situation_ l.yccovid_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_1
reghdfe  l.prevention_ l.yccovid_ $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_2
reghdfe move2020 l.yccovid_ l.situation_  $weather lconfirmed ldaily regulation if provid!=42 , absorb(cityid datenum) cluster(cityid)
est sto table1_3
reghdfe move2020  l.yccovid_ l.prevention_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_4
reghdfe move2020  l.yccovid_ l.prevention_ l.situation_ $weather lconfirmed ldaily regulation  if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_5
esttab table1_1 table1_2 table1_3 table1_4 table1_5 using Table7.rtf, nogap r2 se star(* 0.05 ** 0.01 *** 0.001)   b(%9.4f) replace






/////Table 8. Heterogeneous effects of government social media posts on citizen compliance behavior in cities with different features.

reghdfe move2020 l.yccovid_ c.l.yccovid_#c.gdpp2019 $weather lconfirmed  ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_1
margins, dydx(l.yccovid_) at (gdpp2019=(0(2)20)) saving(linear, replace)
marginsplot, recast(line) plotopts( lcolor(black)) recastci(rline) ciopts(lpattern(dash) lcolor(black)) ///
 xtitle("Gross domestic product per capita (10000 Chinese Yuan)") ytitle("Effect of government social media posts" "on inner-city mobility index") title("")

reghdfe move2020 l.yccovid_ c.l.yccovid_#c.internetp2019  $weather lconfirmed  ldaily regulation if provid!=42 , absorb(cityid datenum) cluster(cityid)
est sto table1_2
margins, dydx(l.yccovid_) at (internetp2019=(0(0.1)1))
marginsplot, recast(line) plotopts( lcolor(black)) recastci(rline) ciopts(lpattern(dash) lcolor(black)) ///
 xtitle("WEB (internet penetration rate)") ytitle("Effect of government social media posts" "on inner-city mobility index") title("")

reghdfe move2020 l.yccovid_ c.l.yccovid_#c.education2020  $weather lconfirmed  ldaily regulation if provid!=42  , absorb(cityid datenum) cluster(cityid)
est sto table1_3
margins, dydx(l.yccovid_) at (education2020=(5(0.5)12.5))
marginsplot, recast(line) plotopts( lcolor(black)) recastci(rline) ciopts(lpattern(dash) lcolor(black)) ///
 xtitle("EDU (average education years)") ytitle("Effect of government social media posts" "on inner-city mobility index") title("")
reghdfe move2020 l.yccovid_ c.l.yccovid_#c.gdpp2019  c.l.yccovid_#c.internetp2019 c.l.yccovid_#c.education2020  $weather lconfirmed  ldaily  regulation if provid!=42 , absorb(cityid datenum) cluster(cityid)
est sto table1_4

esttab table1_1 table1_2 table1_3 table1_4 using Table8.rtf, nogap r2 se star(* 0.05 ** 0.01 *** 0.001)  b(%9.4f) replace






/////Supplementary appendix
/////Table A3.  Effect of government social media posts on citizen compliance behavior with province-date fixed effects and city fixed effects
reghdfe move2020 l.yccovid_ if provid!=42, absorb(cityid $provdate) vce (cluster cityid)
est sto table1_1
reghdfe move2020 l.yccovid_   $weather if provid!=42, absorb(cityid $provdate) vce (cluster cityid)
est sto table1_2
reghdfe move2020 l.yccovid_  $weather lconfirmed ldaily if provid!=42, absorb(cityid $provdate) vce (cluster cityid)
est sto table1_3
reghdfe move2020 l.yccovid_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid $provdate) vce (cluster cityid)
est sto table1_4

esttab table1_1 table1_2 table1_3 table1_4 using TableA3.rtf, nogap con r2 se star(* 0.05 ** 0.01 *** 0.001) b(%9.4f) replace


/////Table A4. Robustness checks with alternative measures and a placebo test with province-date fixed effects and city fixed effects

reghdfe lnbaidumap l.yccovid_  $weather lconfirmed  ldaily regulation if provid!=42, absorb(cityid $provdate) cluster(cityid)
est sto table1_1
reghdfe lngaodemap l.yccovid_  $weather lconfirmed  ldaily regulation if provid!=42, absorb(cityid $provdate) cluster(cityid)
est sto table1_2
reghdfe move2019 l.yccovid_ if provid!=42, absorb(cityid $provdate) cluster(cityid)
est sto table1_3

esttab table1_1 table1_2 table1_3   using TableA4.rtf, nogap r2 se star(* 0.05 ** 0.01 *** 0.001)  b(%9.4f) replace


/////Table A5. Effect of government social media posts on citizen compliance behavior: IV strategy with province-date fixed effects and city fixed effects

ivreghdfe move2020 (l.yccovid_=l.lnguanzhuAfter) if provid!=42, absorb(cityid $provdate) cluster(cityid) first
est sto table1_1
ivreghdfe move2020 (l.yccovid_=l.lnguanzhuAfter)  $weather if provid!=42, absorb(cityid $provdate) cluster(cityid) first
est sto table1_2
ivreghdfe move2020 (l.yccovid_=c.l.lnguanzhuAfter) $weather lconfirmed ldaily if provid!=42, absorb(cityid $provdate) cluster(cityid) first
est sto table1_3
ivreghdfe move2020 (l.yccovid_=c.l.lnguanzhuAfter) $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid $provdate) cluster(cityid) first
est sto table1_4
esttab table1_1 table1_2 table1_3 table1_4   using TableA5.rtf, nogap con r2 se star( * 0.05 ** 0.01 *** 0.001) b(%9.4f) replace


/////Table A6. Mediation analysis of effects of different topics in government social media posts on citizen compliance behavior with province-date fixed effects and city fixed effects
reghdfe l.situation_  l.yccovid_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid $provdate) cluster(cityid)
est sto table1_1
reghdfe l.prevention_  l.yccovid_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid $provdate) cluster(cityid)
est sto table1_2
reghdfe move2020 l.yccovid_ l.situation_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid $provdate) cluster(cityid)
est sto table1_3
reghdfe move2020  l.yccovid_ l.prevention_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid $provdate) cluster(cityid)
est sto table1_4
reghdfe move2020  l.yccovid_ l.prevention_ l.situation_ $weather lconfirmed ldaily regulation  if provid!=42, absorb(cityid  $provdate) cluster(cityid)
est sto table1_5
esttab table1_1 table1_2 table1_3 table1_4  table1_5 using TableA6.rtf, nogap r2 se star(* 0.05 ** 0.01 *** 0.001)   b(%9.4f) replace


/////Table A7. Heterogeneous effect of government social media posts on citizen compliance behavior in cities with different features with province-date fixed effects and city fixed effects
reghdfe move2020 l.yccovid_ c.l.yccovid_#c.gdpp2019  $weather lconfirmed  ldaily regulation if provid!=42, absorb(cityid $provdate) cluster(cityid)
est sto table1_1
reghdfe move2020 l.yccovid_ c.l.yccovid_#c.internetp2019 $weather lconfirmed  ldaily regulation if provid!=42 , absorb(cityid $provdate) cluster(cityid)
est sto table1_2
reghdfe move2020 l.yccovid_ c.l.yccovid_#c.education2020  $weather lconfirmed  ldaily regulation if provid!=42, absorb(cityid $provdate) cluster(cityid)
est sto table1_3
reghdfe move2020 l.yccovid_ c.l.yccovid_#c.gdpp2019  c.l.yccovid_#c.internetp2019 c.l.yccovid_#c.education2020  $weather lconfirmed  ldaily  regulation if provid!=42 , absorb(cityid $provdate) cluster(cityid)
est sto table1_4

esttab table1_1 table1_2 table1_3 table1_4 using TableA7.rtf, nogap r2 se star(* 0.05 ** 0.01 *** 0.001)  b(%9.4f) replace



/////Table A8. Mediation analysis of effects of different topics in government social media posts on citizen compliance behavior using iv
reghdfe  l.situation_ plyccovid_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_1
reghdfe  l.prevention_ plyccovid_ $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_2
reghdfe move2020 plyccovid_ l.situation_  $weather lconfirmed ldaily regulation if provid!=42 , absorb(cityid datenum) cluster(cityid)
est sto table1_3
reghdfe move2020  plyccovid_ l.prevention_  $weather lconfirmed ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_4
reghdfe move2020  plyccovid_ l.prevention_ l.situation_ $weather lconfirmed ldaily regulation  if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_5
esttab table1_1 table1_2 table1_3 table1_4 table1_5 using TableA8.rtf, nogap r2 se star(* 0.05 ** 0.01 *** 0.001)   b(%9.4f) replace




/////Table A9. Heterogeneous effects of government social media posts on citizen compliance behavior in cities with different features  using iv
reghdfe move2020 plyccovid_ c.plyccovid_#c.gdpp2019 $weather lconfirmed  ldaily regulation if provid!=42, absorb(cityid datenum) cluster(cityid)
est sto table1_1

reghdfe move2020 plyccovid_ c.plyccovid_#c.internetp2019  $weather lconfirmed  ldaily regulation if provid!=42 , absorb(cityid datenum) cluster(cityid)
est sto table1_2

reghdfe move2020 plyccovid_ c.plyccovid_#c.education2020  $weather lconfirmed  ldaily regulation if provid!=42  , absorb(cityid datenum) cluster(cityid)
est sto table1_3

reghdfe move2020 plyccovid_ c.plyccovid_#c.gdpp2019  c.plyccovid_#c.internetp2019 c.plyccovid_#c.education2020  $weather lconfirmed  ldaily  regulation if provid!=42 , absorb(cityid datenum) cluster(cityid)
est sto table1_4

esttab table1_1 table1_2 table1_3 table1_4 using TableA9.rtf, nogap r2 se star(* 0.05 ** 0.01 *** 0.001)  b(%9.4f) replace





/////Table A10. Effect of government social media posts on citizen compliance behavior with hubei sample
reghdfe move2020 l.yccovid_ if provid==42, absorb(cityid datenum) vce (cluster cityid)
est sto table1_1
reghdfe move2020 l.yccovid_   $weather if provid==42 , absorb(cityid datenum) vce (cluster cityid)
est sto table1_2
reghdfe move2020 l.yccovid_  $weather lconfirmed ldaily if provid==42, absorb(cityid datenum) vce (cluster cityid)
est sto table1_3
ivreghdfe move2020 (l.yccovid_=l.lnguanzhuAfter) if provid==42 , absorb(cityid datenum) cluster(cityid)
est sto table1_4
ivreghdfe move2020 (l.yccovid_=l.lnguanzhuAfter)  $weather if provid==42 , absorb(cityid datenum) cluster(cityid)
est sto table1_5
ivreghdfe move2020 (l.yccovid_=c.l.lnguanzhuAfter) $weather lconfirmed ldaily if provid==42, absorb(cityid datenum) cluster(cityid)
est sto table1_6


esttab table1_1 table1_2 table1_3 table1_4 table1_5 table1_6 using TableA10.rtf, nogap con r2 se star(* 0.05 ** 0.01 *** 0.001) b(%9.4f) replace


















